Skip to main content

Create VA

API VA Flow

Path

  • URL: /cb-core/api/v1/va/create
  • Method: POST
  • Description: This API allows to create Virtual Accounts(VA) for the Sellers who want Baokim to collect the VND amount via VA

Request

Request Table

ParamsData Type + LengthRequiredDescription
request_idstring(50)YesUnique request ID, suggested format: MerchantCode+YYYYMMDDHHMMSS+UniqueId
request_timestring(19)YesRequest time in format: YYYY-MM-DD HH:MM:SS
merchant_codestring(20)YesMerchant code provided by Baokim before integration
sub_merchant_codestring(50)YesIf the Seller is under your sub-merchant, fill your sub merchant code provided by Baokim.
If Seller is under you, fill your Merchant_code provided by Baokim as above
seller_idstring(50)YesSeller ID matching the Onboarding Sellers API
midstring(50)NoOn-platform MID of the Seller (optional, only for On-platform merchants)
acc_namestring(63)YesVirtual Account holder's name
reference_codestring(100)YesThe reference code of VA managed in your system. This code is unique
typeint(1)No1: Collect the correct amount, 2: Collect the free amount. Default = 2
amountstring(25)Notype = 1 => The amount you want to collect
number_of_times_collectstring(25)Yes-1: unlimited, >= 1 number of times collect
expire_datestring(19)YesFormat: YYYY-MM-DD HH:MM:SS
memostring(255)NoTransfer remark when transfering amount into QR
va_purposeint(1)YesPurpose of the Virtual Account
1: Ecom Shopee Vietnam
2: Ecom Lazada Vietnam
3: Ecom Tiktokshop Vietnam
4: B2B
5: Website
6: Other
7: All

Request Example

{
"request_id": "MERCHANT12345678901234510281",
"request_time": "2024-11-15 14:36:00",
"merchant_code": "PHUONGTT",
"sub_merchant_code": "SUBPHUONGTT",
"seller_id": "SELLER12345",
"mid": "MID12345",
"acc_name": "Nguyen Van A",
"reference_code": "REF1231081",
"type": 1,
"amount": "1000000",
"number_of_times_collect": "10",
"expire_date": "2024-11-20 12:00:00",
"memo": "Payment for order 12345",
"va_purpose": 1
}

Response

Response Table

ParamsData Type + LengthRequiredDescription
response_codeint(4)YesError code from Baokim as per Error Codes Table
response_messagestring(100)YesDescription of the error code from Baokim as per Error Codes Table
merchant_codestring(20)YesMerchant code provided by Baokim before integration
reference_codestring(100)YesThe reference code of VA managed in your system. This code is unique
statusint(1)Yes1: Active; 2: Inactive
expire_datestring(19)YesFormat: YYYY-MM-DD HH:MM:SS
account_infoobjectYesVirtual account details
account_info.bank_namestring(100)YesBank name
account_info.bank_nostring(6)YesBank no
account_info.bank_branchstring(100)YesBank branch
account_info.acc_nostring(22)YesBank account number
account_info.acc_namestring(63)YesAccount holder's name
account_info.qrstring(100)YesQR string encoded with base64
account_info.qr_pathstring(100)YesQR image path

Response Example

{
"response_code":200,
"response_message":"Success",
"merchant_code":"PHUONGTT",
"reference_code":"REF1231081",
"status":1,
"expire_date":"2024-11-20 12:00:00",
"account_info":{
"bank_name":"Ngân hàng Thương mại Cổ phần Đầu tư và Phát triển Việt Nam",
"bank_no":"970418",
"bank_branch":"Hà Nội",
"acc_no":"963336011173760",
"acc_name":"NGUYEN VAN A",
"qr":"00020101021238590010A0000007270129000697041801159633360111737600208QRIBFTTA5303704540710000005802VN6304DC31",
"qr_path":"https://devtest.baokim.vn/vietqr/core/view/BKREF123108120241115143913.jpg"
}
}

Error Code

Response CodeResponse Message
200Success
99Pending
11Failed
101System Error
110Merchant Code Invalid
120Invalid Signature
422Validation Error